<?php
$screen = Blyn::app()->getCurrentNode()->getUIManager()->getCurrentScreen();
?>
<div style="margin-left: 20px">
    <div style="margin-top: 15px">
        <?php
        /** @var BootActiveForm $form */
        $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
            'id' => 'searchForm',
            'type' => 'search',
            'htmlOptions' => array('class' => 'well'),
                ));
        ?>
        <?php echo $form->textFieldRow($model, 'searchText', array('class' => 'input-medium', 'prepend' => '<i class="icon-search"></i>')); ?>
        <?php $ajaxViews = array(array('ajaxView' => 'joinServiceItemView')); ?>
        <?php        
        $ajaxSubmitBtn = $screen->buildAjaxLink('joinServiceSearch', 'Search',NULL, $ajaxViews,
                //array('replace' => "#show_service_list", 
                array('success' => "js:function(html)
                    {                      
                        $('#show_service_list').html(html);                        
                    }",
            'type' => 'post'), array('class' => 'btn'));
        ?>
        <?php echo $ajaxSubmitBtn ?>
        <?php $this->endWidget(); ?>        
    </div>
</div>
<div id="show_service_list"></div>